const mongoose = require('mongoose')
const Schema = mongoose.Schema;
const BaseModel = require('./baseModel')

/**
 * 用户模型
 * @type {mongoose.Schema}
 */
const WebErrorLogSchema = new Schema({
  ...BaseModel,
  /**
   * 错误信息
   */
  "errMsg": {type: String, default: ''},
  /**
   * 信息
   */
  "info": {type: String, default: ''},
  /**
   * 路由
   */
  "routerPath": {type: String, default: ''},
  /**
   * 错误信息
   */
  "domClass": {type: String, default: ''},
  /**
   * 浏览器型号
   */
  "userAgent": {type: String, default: ''},
  /**
   * 用户名
   */
  "userName": {type: String, default: ''},
  /**
   * 默认标记
   */
  "defaultTag": {type: String, default: ''},
});

const model = mongoose.model('webErrorLog', WebErrorLogSchema, 'webErrorLogs');

module.exports = model
